package com.visitor.demo2.impl;

import com.visitor.demo2.GraphicVisitor;

//AddGraphicVisitor.java 添加图形访问者类
/** Add:添加图形操作集合,在此处具体实现添加图形的具体操作 */
public class AddGraphicVisitor implements GraphicVisitor
{
    public void visit(MyCircle graphic)
    {
        System.out.println("已添加MyCircle图形");
    }

    public void visit(MyRectangle graphic)
    {
        System.out.println("已添加MyRectangle图形");
    }

    public void visit(MyRegularTriangle graphic)
    {
        System.out.println("已添加MyRegularTriangle图形");
    }
}